package com.kevin.springcloud.helloservice.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/Hello")
public class HelloController {

    private @Value("${server.port: }") String port;

    @GetMapping("sayHello")
    public String sayHello(){
        return "Hello,"+port+" Spring Cloud Service!";
    }

    @GetMapping("saySomething/{something}")
    public String saySomething(@PathVariable String something){
        return  something;
    }
}
